<?php
require('lib/verify.php');
require('lib/has_char.php');
require('lib/is_approved.php');

$_category = "warmath";
$_title = "Wishlist";
require('lib/head.php');

if($_GET["error"]!="") {
  boxRed("Error");
?>
    <?=$_GET["error"]?>
<?php
    boxBot();
    }

boxTop("Warmath: $_title");
?>

This is your wishlist:<br /><br />
<?php
if($system["system_tier"]==4) {
?>
<b>Max</b><br />
<?php
$sql = "select * from wm_wishes left join wm_items on wm_wishes.wish_item = wm_items.item_id where wish_character='" . $character["character_id"] . "' and wish_level='3'";
$result = $db->query($sql);
while($wish = $db->fetch_assoc($result)) {
  show_wish($wish, "wishlist.php", $system);
     }
?>

<br /><br />

<b>Mod</b><br />
<?php
$sql = "select * from wm_wishes left join wm_items on wm_wishes.wish_item = wm_items.item_id where wish_character='" . $character["character_id"] . "' and wish_level='2'";
$result = $db->query($sql);
while($wish = $db->fetch_assoc($result)) {
  show_wish($wish, "wishlist.php", $system);
     }
?>

<br /><br />

<b>Min</b> <i>Marking items as Min is optional, but useful for letting others know what you're interested in.</i><br />
<?php
$sql = "select * from wm_wishes left join wm_items on wm_wishes.wish_item = wm_items.item_id where wish_character='" . $character["character_id"] . "' and wish_level='1'";
$result = $db->query($sql);
while($wish = $db->fetch_assoc($result)) {
  show_wish($wish, "wishlist.php", $system);
     }
?>

<br /><br />

<?php
}
else {
?>
<b>Max</b><br />
<?php
$sql = "select * from wm_wishes left join wm_items on wm_wishes.wish_item = wm_items.item_id where wish_character='" . $character["character_id"] . "' and wish_level='4'";
$result = $db->query($sql);
while($wish = $db->fetch_assoc($result)) {
  show_wish($wish, "wishlist.php", $system);
     }
?>

<br /><br />

<b>Mod</b><br />
<?php
$sql = "select * from wm_wishes left join wm_items on wm_wishes.wish_item = wm_items.item_id where wish_character='" . $character["character_id"] . "' and wish_level='3'";
$result = $db->query($sql);
while($wish = $db->fetch_assoc($result)) {
  show_wish($wish, "wishlist.php", $system);
     }
?>

<br /><br />

<b>Min</b><br />
<?php
$sql = "select * from wm_wishes left join wm_items on wm_wishes.wish_item = wm_items.item_id where wish_character='" . $character["character_id"] . "' and wish_level='2'";
$result = $db->query($sql);
while($wish = $db->fetch_assoc($result)) {
  show_wish($wish, "wishlist.php", $system);
     }
?>

<br /><br />

<b>Micro</b> <i>Marking items as Micro is optional, but useful for letting others know what you're interested in.</i><br />
<?php
$sql = "select * from wm_wishes left join wm_items on wm_wishes.wish_item = wm_items.item_id where wish_character='" . $character["character_id"] . "' and wish_level='1'";
$result = $db->query($sql);
while($wish = $db->fetch_assoc($result)) {
  show_wish($wish, "wishlist.php", $system);
     }
?>

<br /><br />

<?php
}
?>

<br /><br />

To mark new items, please <a href="loot.php">browse loot</a>.

<?php
boxBot();
?>

<?php
require('lib/foot.php');
?>

